import axios from '../../http/http'
import * as api from '../../http/api'
const state = {
   paibanData: []


}

const actions = {
    //页面加载获取数据
    getpaibanData({commit}){
        return axios({
            url:api.paiban,
            method:'get',
        }).then(res=>{
            // console.log(res.data) 这个里面有3个东西  code data token
            // 目的是讲data储存在vuex里面

            commit('addData',res.data.info)
            // console.log(res.data)
            return res.code
        })







    },





}
const mutations = {
    addData(state,obj){
        state.paibanData = obj


    },
    // removeData(state){
    //     state.canZhuoData.canZhuoData = []
    //     state.canZhuoData.type = ''
    //     state.canZhuoData.canState = ''
    // }
}
const getters={




}
export default {
    state,
    actions,
    mutations,
    getters
}